package com.shenke.logging.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 操作日志实体类
 */
@Data
@TableName(value ="operation_logs")
public class OperationLog implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 日志ID
     */
    @TableId(value = "log_id", type = IdType.AUTO)
    private Long logId;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 操作类型
     */
    @TableField(value = "action")
    private String action;

    /**
     * IP地址
     */
    @TableField(value = "ip")
    private String ip;

    /**
     * 详细信息
     */
    @TableField(value = "detail")
    private String detail;

    /**
     * 消息ID，用于幂等性处理
     */
    @TableField(value = "message_id")
    private String messageId;
}